const mockImages = [
  'https://images.unsplash.com/photo-1682686580391-8b2b2b21b0fb?w=400&h=600&fit=crop',
  'https://images.unsplash.com/photo-1682687220063-4742bd7fd538?w=400&h=500&fit=crop',
  'https://images.unsplash.com/photo-1682686581427-7c80ab8b85d5?w=400&h=700&fit=crop',
  'https://images.unsplash.com/photo-1682687221248-3116ba6ab483?w=400&h=600&fit=crop',
  'https://images.unsplash.com/photo-1682687220067-d9a4f256b3b3?w=400&h=550&fit=crop',
  'https://images.unsplash.com/photo-1682687220143-0df3a2737c8a?w=400&h=650&fit=crop',
  'https://images.unsplash.com/photo-1682687220067-d9a4f256b3b3?w=400&h=450&fit=crop',
  'https://images.unsplash.com/photo-1682686580391-8b2b2b21b0fb?w=400&h=700&fit=crop',
]

const mockAvatars = [
  'https://images.unsplash.com/photo-1494790108755-2616b612b786?w=100&h=100&fit=crop&crop=face',
  'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100&h=100&fit=crop&crop=face',
  'https://images.unsplash.com/photo-1517841905240-472988babdf9?w=100&h=100&fit=crop&crop=face',
  'https://images.unsplash.com/photo-1539571696357-5a69c17a67c6?w=100&h=100&fit=crop&crop=face',
]

const mockTitles = [
  '今日份的美好心情分享',
  '这个城市也太美了吧',
  '周末探店日记',
  '美食分享时刻',
  'OOTD今日穿搭',
  '旅行碎片记录',
  '生活小确幸',
  '今日份快乐源泉',
]

const mockContents = [
  '今天的阳光真的超级好，忍不住多拍了几张照片分享给大家～',
  '发现了这家宝藏店铺，环境超赞，东西也好吃！',
  '这套穿搭真的太喜欢了，简单又好看，姐妹们冲！',
  '生活就是要这样慢慢记录，每一个瞬间都值得被珍藏',
  '今天的晚霞太美了，手机根本拍不出它的万分之一',
]

const mockTags = [
  ['生活', '分享', '日常'],
  ['美食', '探店', '打卡'],
  ['穿搭', 'OOTD', '时尚'],
  ['旅行', '风景', '摄影'],
  ['美食', '生活', '记录'],
]

const mockNames = [
  '小仙女日记',
  '美食探索家',
  '穿搭博主',
  '旅行摄影师',
  '生活记录者',
]

export function generateMockData(count: number) {
  const data = []
  
  for (let i = 0; i < count; i++) {
    const imageCount = Math.floor(Math.random() * 3) + 1
    const images = []
    
    for (let j = 0; j < imageCount; j++) {
      images.push(mockImages[Math.floor(Math.random() * mockImages.length)])
    }
    
    data.push({
      id: `post-${Date.now()}-${i}`,
      title: mockTitles[Math.floor(Math.random() * mockTitles.length)],
      content: mockContents[Math.floor(Math.random() * mockContents.length)],
      images,
      author: {
        name: mockNames[Math.floor(Math.random() * mockNames.length)],
        avatar: mockAvatars[Math.floor(Math.random() * mockAvatars.length)],
      },
      likes: Math.floor(Math.random() * 1000) + 100,
      comments: Math.floor(Math.random() * 100) + 10,
      tags: mockTags[Math.floor(Math.random() * mockTags.length)],
      createdAt: new Date(Date.now() - Math.random() * 7 * 24 * 60 * 60 * 1000).toISOString(),
    })
  }
  
  return data
}
